{% autoescape off %}
<div class="ui-widget summary">
    <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"> 
        <div>
            <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
            合计: 总Man Day: <span class="summary_num">{{total_estimated_mds}}</span>.
        </div>
    </div>
</div>
<input id="task_id" type="hidden" /> </td>
<table style="width:100%">
    <tr style="font-weight:bold">
        <td class="name">任务名称</td>
        <td class="estimated_mds">ManDay</td>
        <td class="start_date">开始日期</td>
        <td class="end_date">结束日期</td>
        <td class="tag">TAG</td>
        <td class="status">状态</td>
        <td class="assignee">负责人</td>
        <td>操作</td>
    </tr>
    {% for task in tasks %}
        <tr bgcolor="{% cycle 'white' '#dddddd' %}">
            <td id="name_{{task.id}}" width="200px">{{task.name}}</td>
            <td>
                <a id="estimated_mds_{{task.id}}" href="search?estimated_mds={{task.estimated_mds|default_if_none:""}}">{{task.estimated_mds|default_if_none:""}}</a>
            </td>
            <td>
                <a id="start_date_{{task.id}}" href="search?start_date={{task.start_date|default_if_none:""}}">{{task.start_date|date:"Y-m-d"|default_if_none:""}}</a>
            </td>
            <td>
                <a id="end_date_{{task.id}}" href="search?end_date={{end_date|default_if_none:""}}">{{task.end_date|date:"Y-m-d"|default_if_none:""}}</a>
            </td>
            <td>
                <span id="tag_{{task.id}}">{{task.tag}}</span>
            </td>
            <td>
                <a id="status_id_{task.id}}" href="search?status={{task.status.id}}">{{task.status.name}}</a>
            </td>
            <td>
                <a id="assignee_{{task.id}}" href="search?assignee={{task.assignee.id}}">{{task.assignee.first_name}}</a>
            </td>
            <td width="238px">
            {% if not task.is_finished %}
                <a href="javascript:void(0)" onclick="completeTask({{project.id}}, {{task.id}})">完成</a>
            {% endif %}
                <a href="javascript:void(0)" onclick="editTask({{task.id}})">编辑</a>
                <a href="javascript:void(0)" onclick="deleteTask({{project.id}}, {{task.id}})">删除</a>
            </td>
        </tr>
    {% endfor %}
</table>

{% endautoescape %}
